package com.zjq.designpatterns.creation.prototype.code.use1;/*
 * 版权信息: 北京千⾥马网信科技有限公司</br>
 * Copyright ©2008-2018. All rights reserved. 京ICP备16007318号
 */

import java.text.MessageFormat;

/**
 * @author jessie
 * @version 1.0
 * @date 2021/1/22
 */
public class MailUtil {
    public static void sendMail(Mail mail){
        String outputContent = "向{0}同学，邮件地址:{1},邮件内容:{2},发送邮件成功";
        System.out.println(MessageFormat.format(outputContent,
                mail.getName(), mail.getEmailAddress(), mail.getContent()));
    }

    public static void saveOriginMailRecord(Mail mail){
        System.out.println("存储originMail记录，originMail:"+mail.getContent());
    }
}
